// server.js
const express = require('express');
// const cors = require('cors');
const app = require('E:\\Datie_Fun_Billiard\\server\\app.js');
// const app = express();
const mysql = require('mysql2');

// 数据库连接配置
const connection = mysql.createConnection({
    host: 'localhost',
    user: 'root',
    password: '123456',
    database: 'datie',
    port: 3306,
    authPlugin: 'mysql_native_password'
});

// 测试数据库连接
connection.connect();

// 导出数据库连接
module.exports = connection;